package com.pikaqiu.warehouse.domain.req;

import com.pikaqiu.warehouse.domain.entity.Company;
import com.pikaqiu.warehouse.utils.DateUtils;
import lombok.Data;

/**
 * @Author: Administrator
 * @Date: 2024/8/15
 */
@Data
public class CompanyForm {
    private Integer id;

    private String name;

    private String desc;

    private String image;

    public Company toCompany() {
        Company company = new Company();
        company.setId(id);
        company.setCompanyName(name);
        company.setRegisterDate(DateUtils.date());
        company.setImage(image);
        company.setDescription(desc);
        return company;
    }
}
